package com.jt.chapter04.config;

import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @author jiang tao
 * @date 2022/1/7
 * @description:
 **/
public class CustomPasswordEncoder implements PasswordEncoder {
    @Override
    public String encode(CharSequence charSequence) {
        return charSequence.toString();
    }

    @Override
    public boolean matches(CharSequence charSequence, String s) {
        String charStr = charSequence.toString();
        return charStr.equals(s);
    }
}
